package de.softcon.sc4retail.domainmodel;

import java.util.UUID;

/**
 * Cart items are stored in a shopping cart.
 * 
 * @author fmannan
 *
 */
public class CartItem {
	
	private String name;
	private String manufacturer;
	
	private double price;
	private String productID;
	private int itemAmount = 1;
	
	public CartItem(String name, String manufacturer, double itemPrice) {
		this.name = name;
		this.price = itemPrice;
		this.manufacturer = manufacturer;
		this.productID = UUID.randomUUID().toString();
	}

	public void increaseAmountBy(int factor)
	{
		itemAmount += factor;
	}

	public String getName() {
		return name;
	}

	public String getManufacturer() {
		return manufacturer;
	}

	public double getPrice() {
		return price;
	}

	public String getProductID() {
		return productID;
	}

	public int getItemAmount() {
		return itemAmount;
	}
}
